const fs = require('fs');
const path = require('path');

// 完整路径 ： __dirname + ‘相对路径’
// let res = path.resolve(__dirname, './index.js');
// console.log(res)

// 文件的绝对路径
// console.log(__filename);

// basename  dirname
let str = '/home/zhaoyu/桌面/atguigu-nodejs/path模块.js'
console.log(path.parse(str))
console.log(path.basename(str))
console.log(path.dirname(str))
